const Router = require('@koa/router');
const router = new Router();
const userRouter = require('./users')
const articleRouter = require('./article')
const productsRouter = require('./products')
const auth = require('../middleWares/auth')

router
  .use(['/articles'], auth)
  .use('/articles', articleRouter.routes(), articleRouter.allowedMethods())
  .use('/users', userRouter.routes(), userRouter.allowedMethods())
  .use('/products', productsRouter.routes(), productsRouter.allowedMethods())

module.exports = router
